package com.turing.post.salesmanage.util;

import java.math.BigInteger;
import java.util.List;

import javax.ejb.Local;
import javax.ejb.Remote;

import com.turing.post.util.PCPSApplicationException;
import com.turing.post.util.PCPSWebInput;

/**
 * 赎回单业务接口
 * 
 * @author zxp
 * @Jan 29, 2013
 */
@Remote
@Local
public interface RedempOrderBusiness {

	/**
	 * 创建赎回单
	 * 
	 * @param webInput
	 * @param redempOrder
	 * @param redOrderList
	 * @return
	 * @throws PCPSApplicationException
	 */
	public RedempOrder createRedempOrder(PCPSWebInput webInput,
			RedempOrder redempOrder, List<RedempOrderDetail> redOrderList)
			throws PCPSApplicationException;

	/**
	 * 取消赎回单
	 * 
	 * @param webInput
	 * @param redempOrder
	 * @throws PCPSApplicationException
	 */
	public void cancelRedempOrder(PCPSWebInput webInput, RedempOrder redempOrder)
			throws PCPSApplicationException;

	/**
	 * 终审赎回单
	 * 
	 * @param webInput
	 * @param redempOrder
	 * @throws PCPSApplicationException
	 */
	public void secondAudtRedempOrder(PCPSWebInput webInput,
			RedempOrder redempOrder) throws PCPSApplicationException;

	/**
	 * 赎回单 付款记账
	 * 
	 * @param webInput
	 * @param redempOrder
	 * @throws PCPSApplicationException
	 */
	public void updateAccountRedempOrder(PCPSWebInput webInput,
			RedempOrder redempOrder) throws PCPSApplicationException;

	/**
	 * 扣帐不成功时终止赎回单 扣减冻结资金----------
	 * 
	 * @param webInput
	 * @param redempOrder
	 * @throws PCPSApplicationException
	 */
	public void endRedempOrderByAccountFailed(PCPSWebInput webInput,
			RedempOrder redempOrder) throws PCPSApplicationException;

	/**
	 * 打印赎回单时凭证出库
	 * 
	 * @param webInput
	 * @param saleOrderId
	 * @param voucherId
	 * @param voucherNo
	 * @throws PCPSApplicationException
	 */
	public void updateRedempOrderVoucherNo(PCPSWebInput webInput,
			BigInteger redempOrderId, String voucherNo)
			throws PCPSApplicationException;

	/**
	 * 创建赎回单
	 * 
	 * @param webInput
	 * @param redempOrder
	 * @throws PCPSApplicationException
	 */
	// public BigInteger insertRedempOrder(PCPSWebInput webInput,
	// RedempOrder redempOrder) throws PCPSApplicationException;
	/**
	 * 修改赎回单
	 * 
	 * @param webInput
	 * @param redempOrder
	 * @throws PCPSApplicationException
	 */
	// public void updateRedempOrder(PCPSWebInput webInput, RedempOrder
	// redempOrder)
	// throws PCPSApplicationException;
	/**
	 * 确认赎回单
	 * 
	 * @param webInput
	 * @param redempOrder
	 * @throws PCPSApplicationException
	 */
	// public void confirmRedempOrder(PCPSWebInput webInput,
	// RedempOrder redempOrder) throws PCPSApplicationException;
	/**
	 * 初审赎回单
	 * 
	 * @param webInput
	 * @param redempOrder
	 * @throws PCPSApplicationException
	 */
	// public void firstAudtRedempOrder(PCPSWebInput webInput,
	// RedempOrder redempOrder) throws PCPSApplicationException;
	/**
	 * 拒绝赎回单
	 * 
	 * @param webInput
	 * @param redempOrder
	 * @throws PCPSApplicationException
	 */
	// public void refuseRedempOrder(PCPSWebInput webInput, RedempOrder
	// redempOrder)
	// throws PCPSApplicationException;
}
